﻿using Dapper_Core.Basic;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using EditableAttribute = Dapper_Core.Basic.EditableAttribute;

namespace Dapper_Core.Table
{
    public class Sys_User_Role : BaseModel
    {
        /// <summary>
        /// Guid主键，主键必须加[Key]特性，若想对名为Id的列赋值必须加[Required]特性
        /// </summary>
        [Key]
        [Required]
        public string Id { get; set; }
        /// <summary>
        /// UserCode对应的实体对象
        /// </summary>
        [Editable(false)]
        public Sys_User User { get; set; }
        /// <summary>
        /// 用户Code
        /// </summary>
        public string UserCode { get; set; }
        /// <summary>
        /// RoleCode对应的实体对象
        /// </summary>
        [Editable(false)]
        public Sys_Role Role { get; set; }
        /// <summary>
        /// 角色编码
        /// </summary>
        public string RoleCode { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string Creator { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateDate { get; set; }
    }
}
